import { createRouter, createWebHistory,createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue' // 导入首页组件
import Login from '../views/Login.vue' // 导入登录组件
import FillInfo from '../views/FillInformation.vue' // 信息添加页面
import ForgotPassword from '../views/ForgotPassword.vue' // 忘记密码页面
import Register from '../views/Register.vue' // 注册页面
import Campatylist from '../views/Campatylist.vue' // 公司列表页面
import Workplaceroast from '../views/Workplaceroast.vue' // 职场吐槽页面
import Salarieslist from '../views/Salarieslist.vue' // 薪酬列表
import WorkplaceroastDetail from '../views/Workplaceroast.vue' // 薪酬详情页
import Addsalary from '../views/Addsalary.vue' // 添加薪酬页面
import Roastlist from '../views/Roastlist.vue' // 添加吐槽页面
import RoastDetail from '../views/RoastDetail.vue' // 吐槽详情页面
import PersonalCenter from '../views/PersonalCenter.vue' // 个人中心页面
import AddRoast from '../views/AddRoast.vue' // 发布吐槽页面
import JobList from '../views/joblist.vue' // 职位列表
import CampanyDetail from '../views/CampanyDetail.vue' // 公司详情页面
import ResetPassword from '../views/ResetPassword.vue' // 忘记密码页面
import PredictResult from '../views/PredictResult.vue' // 预测结果页面
import EditInfo from '../views/EditInfo.vue' // 编辑信息
import AnalysisLoading from '../components/AnalysisLoading.vue'   // 预测结果加载页面
import JobRecommendation from '../components/JobRecommendation.vue'  // 职位推荐
import UploadResume from '../components/UploadResume.vue'  // 简历上传
import TabsPage from '../views/TabsPage.vue' // Tabs 页面



const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/fillinfo',
    name: 'FillInfo',
    component: FillInfo
  },
    {
    path: '/forgotpassword',
    name: 'ForgotPassword',
    component: ForgotPassword
  },
    {
    path: '/register',
    name: 'Register',
    component: Register
  },
    {
    path: '/campatylist',
    name: 'Campatylist',
    component: Campatylist
  },
    {
    path: '/workplaceroast',
    name: 'Workplaceroast',
    component: Workplaceroast
  },
    {
    path: '/workplaceroast/:id',
    name: 'WorkplaceroastDetail',
    component: Workplaceroast,
    props: true
  },
    {
    path: '/salarieslist',
    name: 'Salarieslist',
    component: Salarieslist
  },
    {
    path: '/addsalary',
    name: 'Addsalary',
    component: Addsalary
  },
    {
    path: '/roastlist',
    name: 'Roastlist',
    component: Roastlist
  },{
    path: '/roast/:id',
    name: 'RoastDetail',
    component: RoastDetail,
    props: true // 将路由参数传递给组件
  },
   {
    path: '/personal-center',
    name: 'PersonalCenter',
    component: PersonalCenter
  },
   {
    path: '/add-roast',
    name: 'AddRoast',
    component: AddRoast
  },
  {
    path: '/joblist',
    name: 'JobList',
    component: JobList
  },
  {
    path: '/campany-detail',
    name: 'CampanyDetail',
    component: CampanyDetail
  },{
    path: '/reset-password',
    name: 'ResetPassword',
    component: ResetPassword
  }, {
    path: '/predict-result',
    name: 'PredictResult',
    component: PredictResult
  },{
    path: '/edit-info',
    name: 'EditInfo',
    component: EditInfo
  },{
    path: '/analysis-loading',
    name: 'AnalysisLoading',
    component: AnalysisLoading
  },{
    path: '/jobs',
    name: 'JobRecommendation',
    component: JobRecommendation
  },{
    path: '/upload-resume',
    name: 'UploadResume',
    component: UploadResume
  },
  {
    path: '/tabs',
    name: 'TabsPage',
    component: TabsPage
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router